package versionControl.aspectj.test;

import java.io.FileOutputStream;
import java.io.PrintStream;

import versionControl.aspectj.library.History;
import versionControl.aspectj.library.Versioned;

public aspect DebugAspect extends History{
	declare parents: ObjectVersionControlChecker implements Versioned;

	public pointcut showHistory(Versioned Obj): 
		call(void setField(Integer)) && within(ObjectVersionControlChecker) && target(Obj);
    
	public DebugAspect() {
		try{
			super.out = new PrintStream(new FileOutputStream("history_log.txt"));
		}catch(Exception e){ this.out = System.out;}
	}
}